package com.qf.controller;

import com.qf.entity.Pie;
import com.qf.service.ReportService;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@CrossOrigin("*")
@RestController
@RequestMapping("/echarts")
public class ReportController {

    private ReportService reportService;

    public ReportController(ReportService reportService){
        this.reportService = reportService;
    }

    @GetMapping
    public Object getData(Integer n) {
        Map<String, List> pieMap = reportService.getPieAll(n);

        return pieMap;
    }

}
